﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System.Web
{
    public static class HttpRequestExtension
    {
        /// <summary>
        /// 获取远程客户端的 IP 主机地址
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public static string GetUserHostAddress(this HttpRequest request)
        {
            return request.UserHostAddress;
        }
        /// <summary>
        /// 获取远程客户端的 IP 主机地址
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public static string GetUserHostAddress(this HttpRequestBase request)
        {


            return request.UserHostAddress;
        }
    }
}
